
<template>
    <div 
        class="rider_order_operate"
        v-if="serverData.rider_id == '' || serverData.rider_id === myUserInfo._id"
    >
        <view class="rider_order_item">

            <div 
                class="rider_operate_connect" 
                @click.stop="openPopup(serverData,dragBtnStyle,0)"
            >
                <uni-icons  type="phone-filled" size="20" color="#020202"></uni-icons>
                <div class="rider_operate_connect_text">联系</div>
            </div>

            <div 
                class="rider_operate_connect" 
                v-if="dragBtnStyle.showTurnOrderBtn"
                @click.stop="openPopup(serverData,dragBtnStyle,1)"
            >
                <uni-icons  type="tune-filled" size="20" color="#020202"></uni-icons>
                <div class="rider_operate_connect_text">转单</div>
            </div>

            <div class="rider_operate_connect last_rider_operate_connect">
                <button 
                    open-type="contact" 
                    session-from="骑手端"
                    class="open_contact_btn"
                >
                    <uni-icons  type="chatboxes-filled" size="20" color="#020202"></uni-icons>
                    <div class="rider_operate_connect_text">联系客服</div>
                </button>
            </div>

            <div class="rider_operate_btn">
                <div class="rider_operate_btn_bk"> </div>
                <div 
                    class="rider_drag_btn" 
                    :class="dragBtnStyle.customClass"
                    :id="`drag_btn_${serverData.current_loca_key}`"
                    :style="`width:calc(100% - ${operateWidth}px)`"
                    @touchstart="handleTouchstart($event,`drag_btn_${serverData.current_loca_key}`,0)" 
                    @touchmove="handleTouchmove" 
                    @touchend="handleTouchend"
                >
                    <div class="drag_btn_icon">
                        <div class="btn_icon_1 btn_icon_div"></div>
                        <div class="btn_icon_2 btn_icon_div"></div>
                    </div>
                    <div class="drag_btn_text">
                        {{ dragBtnStyle.btnText }}
                    </div>
                </div>
            </div>
        </view>
    </div>
</template>

<script src="./rider-action-bar.ts" lang="ts"></script>

<style lang="stylus" scoped>
@import './rider-action-bar.styl';
</style>
